<template>
  <div class="page">
    首页

    <el-button type="primary" @click="clickBtn">按钮</el-button>
  </div>
</template>

<script lang="ts"></script>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { ElButton } from 'element-plus'
import { useUserStore } from '@/stores/user'
import api from '@/api'
const userStore = useUserStore()

async function clickBtn() {
  const res = await api.user.getUserInfo({ id: 1 })
  console.log(res, 'res')
}

onMounted(() => {
  console.log(userStore.token, 'userStore')
})
</script>

<style scoped lang="scss">
.page {
  width: 100%;
  height: 100vh;
  background-color: red;
  box-sizing: border-box;
}
</style>
